<h2>Account Settings</h2>
<script type="text/javascript" src="<?php echo base_url(); ?>/public/js/jquery.js"></script>
<?php echo form_open_multipart('user/edit_profile'); ?>
<?php
	echo form_fieldset(form_button(array('id' => 'button_personal', 'content' => 'My Profile')));?>
<div id = "personal">
<?php
	echo form_label('First Name', 'firstname'); echo "<br />";
	echo form_input('firstname', set_value('firstname', $reguser['firstname']));
	
	echo "<br />";
	echo form_label('Middle Name', 'middlename'); echo "<br />";
	echo form_input('middlename', set_value('middlename', $reguser['middlename']));
	
	echo "<br />";
	echo form_label('Last Name', 'lastname'); echo "<br />";
	echo form_input('lastname', set_value('lastname', $reguser['lastname']));

	echo "<br /><br />";
	echo form_label('Sex *: ', 'sex'); echo "&nbsp;&nbsp;";
	echo form_radio('gender', 'male', $reguser['gender'] == 'Male' ? TRUE : FALSE) . 'Male'; echo "&nbsp;&nbsp;";
	echo form_radio('gender', 'female', $reguser['gender'] == 'Female' ? TRUE : FALSE) . 'Female';

	echo "<br /><br />";
	echo form_label('Birthday * ', 'birthday'); echo "<br>";
	$month = array(
                  'jan'  	=> 'January',
                  'feb'    	=> 'February',
                  'mar'  	=> 'March',
                  'april'	=> 'April',
                  'may' 	=> 'May',
                  'june' 	=> 'June',
                  'july' 	=> 'July',
                  'august' 	=> 'August',
                  'sept' 	=> 'September',
                  'oct' 	=> 'October',
                  'nov' 	=> 'November',
                  'dec' 	=> 'December',
	);
	echo form_dropdown('month', $month, set_value('month', $reguser['month']));

	$day = array(
				'1' => '1',
				'2' => '2',
				'3' => '3',
				'4' => '4',
				'5' => '5',
				'6' => '6',
				'7' => '7',
				'8' => '8',
				'9' => '9',
				'10' => '10',
				'11' => '11',
				'12' =>	'12',
				'13' => '13',
				'14' =>	'14',
				'15' =>	'15',
				'16' => '16',
				'17' => '17',
				'18' => '18',
				'19' => '19',
				'20' => '20',
				'21' =>	'21',
				'22' => '22',
				'23' => '23',
				'24' => '24',
				'25' => '25',
				'26' => '26',
				'27' => '27',
				'28' => '28',
				'29' => '29',
				'30' => '30',
				'31' => '31',		
	);
	echo form_dropdown('day', $day, set_value('day', $reguser['day']));
    
	$current = (int)date('Y');
	for ($year = 1900; $year <= $current; $year++){
		$years[$year] = $year; 
	} echo form_dropdown('year', $years, set_value('year', $reguser['year'])); 

?>
	<script type="text/javascript">
		$('#personal').hide();
	  	$("#button_personal").click(function () {	
		$("#personal").toggle("fast");
		});    //dito ako mglalagay
	</script><br /><br />
Add profile pic:	
<input type="file" name="userfile" size="20" />
<br /><br />	
<?php echo form_submit('submit', 'Save Profile', 'class="button"'); ?>                    
<?php echo form_fieldset_close(); ?>
<?php echo form_close(); ?>


<?php echo form_open('user/change_password'); ?>
<?php echo form_fieldset(form_button(array('id' => 'button_password', 'content' => 'Edit Password'))); ?>
<div id = "password">
<?php 	
	echo "<strong>*You'd be logged out once you save your new password </strong><br /><br />"; 
	echo form_label('New Password', 'new_password');
	echo "<br />";
	echo form_password('new_password');echo "<br />";

	echo form_label('Confirm New Password', 'conf_new_password');
	echo "<br />";
	echo form_password('conf_new_password');echo "<br /><br />";

	echo form_submit('change', 'Change Password', 'class="button"');
	echo form_fieldset_close(); 
	echo form_close();
?>
	<script type="text/javascript">
		$('#password').hide();
	  	$("#button_password").click(function () {	
		$("#password").toggle("fast");
		});    
	</script>
